<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <title>Laravel</title>

        <!-- Fonts -->
        <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">

    </head>
    <style>
        table tr th{padding:30px}
        table tr td{text-align: center;padding:10px}
    </style>
    <body>
        <table cellpadding="10" cellspacing="10" border="1px" >
            <tr>
                <th>id</th>
                <th>用户名</th>
                <th>商品名称</th>
                <th>价格</th>
                <th>总价</th>
                <th>创建时间</th>
                <th>状态</th>
            </tr>
            @foreach ($orders as $order)
                <tr>
                    <td>{{$order['id']}}</td>
                    <td>{{$order['user']['username']}}</td>
                    <td>{{$order['good_name']}}</td>
                    <td>{{$order['price']}}</td>
                    <td>{{$order['total_price']}}</td>
                    <td>{{$order['created_at']}}</td>
                    <td>{{$order['status']}}</td>
                </tr>
            @endforeach
        </table>
    </body>
</html>
